package com.xiaoxian.basic.util;

import lombok.Data;

@Data
public class AjaxResult {
    private Boolean success=true;

    private String msg="操作成功";

    private String code="200";

    private Object resultObj;
    /**
     * 方便链式编程
     * @return
     */
    public static AjaxResult my(){
        return new AjaxResult();
    }

    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }
    public AjaxResult setCode(String code) {
        this.code = code;
        return this;
    }
    public AjaxResult setPath(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }

    public AjaxResult setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
